<?php

namespace App\Models\Api;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Tymon\JWTAuth\Contracts\JWTSubject;

class User extends Model implements JWTSubject
{
    use HasFactory;
    protected $table = 'users';
    public $timestamps =  false;
    protected $fillable = ['id', 'name', 'password', 'phone', 'email', 'createtime', 'status', 'avatar'];


    public function getJWTIdentifier()
    {
        return $this->getKey();
    }

    public function getJWTCustomClaims()
    {
        return [
            'id' => $this->id,
        ];
    }
}
